<template>
  <div id="rightCon">
    <keep-alive :include="cachedViews">
      <router-view></router-view>
    </keep-alive>
  </div>
</template>

<script>
export default {
  name: 'rightCon',
  msg: '',
  computed: {
    cachedViews() {
      // console.log('cachedViews', this.$store.state.cachedViews)
      return this.$store.state.cachedViews
    }
  },
  data() {
    return {}
  },
  mounted() {
    //获取字典
    this.getDictionaries()
  },
  methods: {
    getDictionaries() {
      let url = '/dictionaries/cache'
      this.pubRequire('get', url, '', (response) => {
        localStorage.setItem('dictionaries', JSON.stringify(response))
      })
    }
  }
}
</script>

<style lang="less">
#rightCon {
}
</style>
